package com.example.demo;

import com.example.demo.model.Person;
import org.kie.api.KieServices;
import org.kie.api.runtime.KieContainer;
import org.kie.api.runtime.KieSession;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/**
 * description： <br>
 * createTime: 2023/7/2414:28 <br>
 *
 * @author zzh
 */
public class Main {

    public static void main(String[] args) {
//        Set<String> set = new HashSet(Arrays.asList(new String[] {}));
        KieServices kServices = KieServices.Factory.get();
        KieContainer kContainer = kServices.getKieClasspathContainer();
        KieSession kSession = kContainer.newKieSession();
        Person jack = new Person("Jack", 20);
        Person mary = new Person("Mary", 17);
        kSession.insert(jack);
        kSession.insert(mary);
        kSession.fireAllRules();
        kSession.dispose();
    }
}
